-- GENERATED SPELL FOR [Warpwood Treant] --


function spell0_11462(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(11428,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11462', 2344, 1)
end

function spell1_11462(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(18368,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11462', 583, 1)
end

function spell2_11462(pUnit, Event) --@Vicious Rend,n/a--
pUnit:FullCastSpellOnTarget(14331,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11462', 15000, 1)
end

function Sorts_11462(pUnit, Event)
local choix_sorts_11462 = math.random(0, 2)
if choix_sorts_11462 == 0 then
pUnit:RegisterEvent('spell0_11462', 1, 1)
end
if choix_sorts_11462 == 1 then
pUnit:RegisterEvent('spell1_11462', 1, 1)
end
if choix_sorts_11462 == 2 then
pUnit:RegisterEvent('spell2_11462', 1, 1)
end
end

function mob11462_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11462', math.random(1500, 3000), 1)
end

function mob11462_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11462_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11462_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11462, 1, 'mob11462_Action')
RegisterUnitEvent(11462, 2, 'mob11462_Leave')
RegisterUnitEvent(11462, 3, 'mob11462_Kill')
RegisterUnitEvent(11462, 4, 'mob11462_Die')
